load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")

go_library(
    name = "corednsgen_lib",
    srcs = ["corednsgen.go"],
    importpath = "github.com/edgelesssys/constellation/v2/internal/constellation/helm/corednsgen",
    visibility = ["//visibility:private"],
    deps = [
        "//internal/versions",
        "@com_github_regclient_regclient//:regclient",
        "@com_github_regclient_regclient//types/ref",
        "@io_k8s_api//apps/v1:apps",
        "@io_k8s_api//core/v1:core",
        "@io_k8s_kubernetes//cmd/kubeadm/app/apis/kubeadm",
        "@io_k8s_kubernetes//cmd/kubeadm/app/images",
        "@io_k8s_kubernetes//cmd/kubeadm/app/phases/addons/dns",
        "@io_k8s_kubernetes//cmd/kubeadm/app/util",
        "@io_k8s_sigs_yaml//:yaml",
    ],
)

go_binary(
    name = "corednsgen",
    embed = [":corednsgen_lib"],
    visibility = ["//:__subpackages__"],
)
